<#assign base=request.contextPath />
<!DOCTYPE html>
<div class="row">
	<div class="col-md-12 col-sm-12 col-xs-12">
		<div class="x_panel">
			<div class="x_title">
		        <h2>系统错误日志 <small></small></h2>
		        <div class="clearfix"></div>
	        </div>
			<div class="x_content">
				<div class="row">
					<div class="col-sm-2">
					</div>
					<div class="col-sm-10">
						<div class="pull-right">
							<label><input type="text" id="startTime" value="${startTime!''}" class="form-control input-sm" placeholder="请选择开始时间"></label>~
							<label><input type="text" id="endTime" value="${endTime!''}" class="form-control input-sm" placeholder="请选择结束时间"></label>
							<button type="button" class="btn btn-dark" onclick="selectQuery('');"><i class="fa fa-search"></i> 查询</button>
						</div>
					</div>
				</div>
				<div class="table-responsive">
					<table class="table table-striped jambo_table bulk_action">
						<thead>
							<tr class="headings">
			                    <th class="column-title">路径 </th>
			                    <th class="column-title">参数 </th>
			                    <th class="column-title">错误时间 </th>
			                    <th class="column-title no-link last">操作 </th>
			                </tr>
						</thead>
			            <tbody>
			            	<#list page.content as obj>
			            	<tr class="even pointer">
			                    <td class=" ">${(obj.path)!'' }</td>
			                    <td class=" ">${(obj.params)!'' }</td>
			                   	<td class=" ">${(obj.createTime)!'' }</td>
			                    <td class="last">
			                    	<button type="button" class="btn btn-dark btn-xs" onclick="toDetail(${(obj.id)?c});"><i class="fa fa-edit"></i> 查看</button>
			                    </td>
			                </tr>
			                </#list>
			            </tbody>
					</table>
				</div>
			</div>
			<#include "../common/paginator.ftl" />
		</div>
	</div>
</div>
<script type="text/javascript">

laydate.render({elem: '#startTime',type: 'datetime'});
laydate.render({elem: '#endTime',type: 'datetime'});	

function selectQuery(pageIndex){
	var data = {
		"pageIndex":pageIndex,
		//其余查询条件自行添加
		"startTime":$("#startTime").val(),
		"endTime":$("#endTime").val(),
	};
	$("#main_content").load('${base}/gx/sysLogError/list',data);	
}

/*进入编辑*/
function toDetail(id){
	$("#main_content").load('${base}/gx/sysLogError/toDetail',{"id":id});	
}
</script>
